package cn.bocweb.net;

import com.google.gson.JsonObject;

import cn.bocweb.encryption.AES256Utils;

/**
 * Created by kaizen on 15/11/13.
 */
public class BocRequestBuilder {

    private JsonObject mObject;

    public static final String ANDROID = "2";

    public static String token = "test";

    public BocRequestBuilder() {
        mObject = new JsonObject();
        mObject.addProperty("terminalNo", ANDROID);
        mObject.addProperty("token", token);
    }

    public BocRequestBuilder put(String key, String value) {
        mObject.addProperty(key, value);
        return this;
    }

    public String build() {
        String content = mObject.getAsJsonObject().toString();
        return AES256Utils.getInstance().addSecureToStr(content);
    }
}
